Skip to content

Conversation

@Luligabi1
Copy link
Contributor

Problem

AbstractCraftingMultiblockBlockEntity implements CrafterComponentHolder, but directly accesses crafter instead of calling getCrafterComponent on tick, meaning any implementing classes are unable to have a custom CrafterComponent.

Solution

All direct accesses to crafter on tick are replaced by getCrafterComponent. This PR also includes a new method called onCraft that allows custom CrafterComponents to detect when a recipe is completed without overriding/mixin injecting tickRecipe.

Use case

Imagine a machine that alters the non-consumed input stack in some way (i.e. one of its data components' value). If said way is not recipe dependent, CrafterComponent is the most sensible place to modify it.

@Technici4n
Copy link
Contributor

Oh so you're writing an addon? Is it public yet?

@Luligabi1
Copy link
Contributor Author

Oh so you're writing an addon? Is it public yet?

Hopefully I can get it out this month 🙂

@Luligabi1 Luligabi1 requested a review from Technici4n July 17, 2025 00:02
@Technici4n Technici4n merged commit 515bb42 into AztechMC:1.21.x Jul 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants